#include "WhileNode.h"

#include "Output/Console.h"
#include "ScriptCompiler/Token/Token.h"
#include "ScriptCompiler/AST/SentenceBlockNode.h"
#include "ExpressionNode.h"

void CWhileNode::DebugPrint(int32_t InDepth)
{
    // Print depth
    for (int32_t i = 0; i < InDepth; ++i)
    {
        WH::Print(U"\t");
    }

    // Print while
    WH::Print(U"while(");

    // Print condition
    Condition->DebugPrint(0);

    // Print )
    WH::Print(U")\n");

    // Print depth
    for (int32_t i = 0; i < InDepth; ++i)
    {
        WH::Print(U"\t");
    }

    // Print {
    WH::Print(U"{\n");

    // Print body
    Body->DebugPrint(InDepth);

    // Print depth
    for (int32_t i = 0; i < InDepth; ++i)
    {
        WH::Print(U"\t");
    }

    // Print }
    WH::Print(U"}\n");
}
